/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.mapper;

import cn.webrx.entity.StduentVo;
import cn.webrx.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>Project: mybatis2022 - StudentMapper
 * <p>Powered by webrx On 2022-04-12 09:12:56
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */

@Mapper @Service
public interface StudentMapper {
    @Insert("insert  into t_student(student_name) value(#{name})")
    @Options(useGeneratedKeys = true,keyColumn = "student_id",keyProperty = "id")
    int add(Student student);

    @Insert("insert  into t_student(student_name) value(#{name})")
    @Options(useGeneratedKeys = true,keyColumn = "student_id",keyProperty = "id")
    int save(Map<String,Object> map);

    int insert(StduentVo s);
    int insert(Map<String,Object> m);
}
